package org.example.bean4;



import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
//@Data   //  lombok框架通过@Data注解已经重写了 equals(), hashcode()
@Scope("singleton")   //默认情况下就是单例的
@Lazy
public class Student {
    private int sid;
    private String sname;

    public Student() {
        System.out.println("Student构造方法");
    }
}
